package reflect;

import reflect.annotations.AutoRunMethod;

import java.lang.reflect.Method;
import java.sql.SQLOutput;

public class ReflectDemo11 {
    public static void main(String[] args) throws Exception {
        Class cls = Class.forName("reflect.Person");
        Method method = cls.getMethod("sayHello");
        boolean mark =method.isAnnotationPresent(AutoRunMethod.class);
        if(mark){
            System.out.println("Person类sayHello方法被@AutoRunMethod标注了");
        }else{
            System.out.println("Person类sayHello方法没有被@AutoRunMethod标注");
        }
    }
}